/**
 * @mbggenerated
 * @author wujian
 */
package bearworker.zxl.dao.mapper;

import bearworker.zxl.entity.WxInterfaceLog;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;

public interface WxInterfaceLogMapper {
    /* @mbggenerated */
    @Delete({
        "delete from wx_interface_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /* @mbggenerated */
    @Insert({
        "insert into wx_interface_log (id, signature, ",
        "openid, nonce, timestamp, ",
        "create_time, bodyStr)",
        "values (#{id,jdbcType=INTEGER}, #{signature,jdbcType=VARCHAR}, ",
        "#{openid,jdbcType=VARCHAR}, #{nonce,jdbcType=VARCHAR}, #{timestamp,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{bodystr,jdbcType=LONGVARCHAR})"
    })
    int insert(WxInterfaceLog record);

    /* @mbggenerated */
    @InsertProvider(type=WxInterfaceLogSqlProvider.class, method="insertSelective")
    int insertSelective(WxInterfaceLog record);

    /* @mbggenerated */
    @Select({
        "select",
        "id, signature, openid, nonce, timestamp, create_time, bodyStr",
        "from wx_interface_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="signature", property="signature", jdbcType=JdbcType.VARCHAR),
        @Result(column="openid", property="openid", jdbcType=JdbcType.VARCHAR),
        @Result(column="nonce", property="nonce", jdbcType=JdbcType.VARCHAR),
        @Result(column="timestamp", property="timestamp", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="bodyStr", property="bodystr", jdbcType=JdbcType.LONGVARCHAR)
    })
    WxInterfaceLog selectByPrimaryKey(Integer id);

    /* @mbggenerated */
    @UpdateProvider(type=WxInterfaceLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WxInterfaceLog record);

    /* @mbggenerated */
    @Update({
        "update wx_interface_log",
        "set signature = #{signature,jdbcType=VARCHAR},",
          "openid = #{openid,jdbcType=VARCHAR},",
          "nonce = #{nonce,jdbcType=VARCHAR},",
          "timestamp = #{timestamp,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "bodyStr = #{bodystr,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(WxInterfaceLog record);

    /* @mbggenerated */
    @Update({
        "update wx_interface_log",
        "set signature = #{signature,jdbcType=VARCHAR},",
          "openid = #{openid,jdbcType=VARCHAR},",
          "nonce = #{nonce,jdbcType=VARCHAR},",
          "timestamp = #{timestamp,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(WxInterfaceLog record);
}